<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>后台文件解析前台读取</title>
    <script src="js/jquery-1.12.4.min.js"></script>
    <script src="js/readFile.js"></script>
</head>
<body>
<form id="dataForm" action="/uploadFileServlet" enctype="multipart/form-data" method="post" target="targetIfr">
    <input type="file" id="file" name="readfile">
    <input type="submit" id="sub" value="显示内容" onclick="return check(this);">
</form>

<iframe name="targetIfr" style="display:none"></iframe> <!-- 实现点击提交，页面不跳转的功能 -->
<div id="show"></div>
</body>
</html>